#include "stack_using_linked_list.h"
#include<stdlib.h>

ListNode* find_n_th_node_from_last(ListNode *head,int n){
    ListNode *node=head;
    while(n>1 && node!=NULL){
        n=n-1;
        node=node->link;
    }
    ListNode *last=head;
    while(node!=NULL && node->link!=NULL){
        last=last->link;
        node=node->link;
    }
    return last;
}
